package leetcode.code0020;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution0020 implements IDebug {

	public abstract boolean isValid(String s);

	private void debug(String s, boolean e) {
		boolean r = this.isValid(s);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug1() {
		String s = "()";
		boolean e = true;
		debug(s, e);
	}

	@Override
	public void debug2() {
		String s = "()[]{}";
		boolean e = true;
		debug(s, e);
	}

	@Override
	public void debug3() {
		String s = "(]";
		boolean e = false;
		debug(s, e);
	}

	@Override
	public void debug4() {
		String s = "([)]";
		boolean e = false;
		debug(s, e);
	}

	public void debug5() {
		String s = "{[]}";
		boolean e = true;
		debug(s, e);
	}

}
